package com.koo.modules.product.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.koo.common.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;
import java.util.Set;

/**
 * @author charlin
 * @email 136137465@qq.com
 * @date 2022-12-19 15:30:46
 */
@Data
@ApiModel()
@TableName("product_category")
public class ProductCategoryEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;
    @ExcelIgnore
    @TableId
    private Long categoryId;

    @ColumnWidth(11)
    @ExcelProperty("分类名称")
    @ApiModelProperty(value = "分类名称")
    private String categoryName;

    @ColumnWidth(11)
    @ExcelProperty("父分类id")
    @ApiModelProperty(value = "父分类id")
    private Long parentId;

    @ColumnWidth(11)
    @ExcelProperty("父分类名称")
    @ApiModelProperty(value = "父分类名称")
    private String parentName;

    @ColumnWidth(11)
    @ExcelProperty("层级")
    @ApiModelProperty(value = "层级")
    private Integer catLevel;

    @ColumnWidth(11)
    @ExcelProperty("是否显示[0-不显示，1显示]")
    @ApiModelProperty(value = "是否显示[0-不显示，1显示]")
    private Integer showStatus;

    @ColumnWidth(11)
    @ExcelProperty("排序")
    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ColumnWidth(11)
    @ExcelProperty("图标地址")
    @ApiModelProperty(value = "图标地址")
    private String icon;

    @TableField(exist = false)
    private List<ProductCategoryEntity> children;

    @TableField(exist = false)
    private Set<Long> selectIds;

}
